Skip to content

feat: Add client-level proxy configuration support#1486

Open
gourabsingha1 wants to merge 3 commits into
databricks:mainfrom
gourabsingha1:feature/client-level-proxy
Open

feat: Add client-level proxy configuration support#1486
gourabsingha1 wants to merge 3 commits into
databricks:mainfrom
gourabsingha1:feature/client-level-proxy

Conversation

@gourabsingha1

Copy link
Copy Markdown

This PR implements client-level proxy configuration support in the Databricks Python SDK to achieve parity with the Databricks Java SDK.

Summary of Changes

  1. Config Properties: Added proxy_url, proxy_username, proxy_password (masked as sensitive), and proxy_auth_type to Config in config.py mapped to environment variables (DATABRICKS_PROXY_URL, DATABRICKS_PROXY_USERNAME, DATABRICKS_PROXY_PASSWORD, and DATABRICKS_PROXY_AUTH_TYPE).
  2. Client Propagation: Passed the proxy options to _BaseClient in core.py.
  3. Session Configuration: Configured the HTTP session in _base_client.py to parse the proxy URL, format/prepend schemes, URL-encode basic auth credentials, and update self._session.proxies.
  4. Validation: Added unit tests in test_proxy.py verifying all credentials encoding and parsing behavior.

@github-actions

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 1486
  • Commit SHA: b2049379ba192e2de7cceabcedb937e13ce03962

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant